const Koa = require('koa');
const { resolve } = require('path');
const serve = require('koa-static');

const app = new Koa();

app.use(serve(resolve(__dirname, './')));

app.listen(4466);

/*
  安装完koa-static以后 node parcel/server.js
  app.use(serve(resolve(__dirname, './')));
  不可改为app.use(serve(resolve(__dirname, './index.js')));
  因为这是访问当前目录的意思
  然后去到package.json进行配置
*/